package W072_081.src.dao;



import W072_081.src.entity.User;
import W072_081.src.factory.DaoFactory;
import W072_081.src.util.JdbcHelper;

import java.sql.Connection;
import java.sql.SQLException;

public class UserService implements UserServiceInterface {
    private UserDaoInterface userDaoInterface= DaoFactory.getDao(UserDaoInterface.class,"UserDao");
    @Override
    public void login(User userToLogin) throws SQLException {
        Connection connection = JdbcHelper.getConn();
        userDaoInterface.login(connection, userToLogin);
        JdbcHelper.close(connection);
    }
}
